#include "server.hpp"


int main()
{
    server s1;
    //std::cout<<"pos 1"<<std::endl;
    //std::cout<<"server"<<std::endl;
    s1.OpenPipeRead();
    //std::cout<<"pos 2"<<std::endl;
    std::string message;
    while(true)
    {
        if(s1.Recvpipe(&message)>0)
        {
            std::cout<<"client say#"<<message<<std::endl;
        }
        else
        {
            std::cout<<"client exit,server exit success~"<<std::endl;
            break;
        }
    }


    s1.Closepipe();
    return 0;
}
